/*
 * GraphicsInstance.h
 *
 *  Created on: Jul 6, 2009
 *      Author: kurt
 */

#ifndef GRAPHICSINSTANCE_H_
#define GRAPHICSINSTANCE_H_

#include <SDL/SDL.h>
#include "Object.h"

/** enable 2D drawings */
extern void glEnable2D();
/** disable 2D drawings */
extern void glDisable2D();
/** flips the texuture matrix */
void flipTextureMatrix();

namespace objdraw {

class GraphicsInstance: public objdraw::Object 
{
	protected:	
		GraphicsInstance();
		GraphicsInstance(const GraphicsInstance&);
		GraphicsInstance& operator= (const GraphicsInstance&);
		
		static GraphicsInstance* _instance;
		SDL_Surface * screen;
		uint videoFlags;
	public:
		virtual ~GraphicsInstance();
		static GraphicsInstance * Instance(void);
		
		static int SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP;
		
		bool Init3DGraphics(void);
		SDL_Surface * getScreen();
		
	    /* resize the window */
		void resizeWindow(int screen_width, int screen_height);
		
		void flipScreen();
};

}

#endif /* GRAPHICSINSTANCE_H_ */
